<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>

<c:set var="nature_value">
    <x:out select="$xmlData/data/organizations/organization[@submit_org='1']/nature_value"/>
</c:set>
<%-- <x:parse xml="${param.xmlstr}" var="xmlData" /> --%>
<input type="hidden" name="zh_parsen/fzr_name"
       value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/zh_name"/>"/>
<input type="hidden" name="zh_parsen/fzr_mobile"
       value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/mobile"/>"/>
<input type="hidden" name="zh_parsen/fzr_tel"
       value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/tel_work"/>"/>
<input type="hidden" name="zh_parsen/fzr_email"
       value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/email"/>"/>
<div class="t_bar"><span class="color_red">*</span>${param.title}</div>
<table class="t_css" width="100%" border="0" cellpadding="0" cellspacing="1" id="projectsituation">
    <col style="width: 25%"/>
    <col style="width: 25%"/>
    <col style="width: 25%"/>
    <col style="width: 25%"/>
    <tr>
        <td align="right">项目名称：</td>
        <td colspan="3">
            <input type='text' name='proposal/zh_title' id='zh_title' style="width: 88%" class="input_css required "
                   maxlength="100" value='<x:out select="$xmlData/data/proposal/zh_title"/>' label="项目名称">
        </td>
    </tr>
    <tr>
        <td align="right">单位技术领域：</td>
        <td>
            <input type='text' name='proposal/technology' id='technology' class="input_css required " maxlength="100"
                   value='<x:out select="$xmlData/data/proposal/technology"/>' label="单位技术领域">
        </td>
        <td align="right">申报日期：</td>
        <td>
            <c:set var="evaluation_time"><x:out select="$xmlData/data/proposal/evaluation_time"/></c:set>
            <cpt:date id="evaluation_time" name="proposal/evaluation_time" value="${evaluation_time}"
                      className="required date" label="申报日期"></cpt:date>
        </td>
    </tr>
    <tr>
        <td align="right">归口管理单位：</td>
        <td colspan="1">
            <c:set var="recomend_org">{'id':'<x:out select="$xmlData/data/proposal/recomend_org_value"/>','name':'<x:out
                    select="$xmlData/data/proposal/recomend_org_name"/>'}</c:set>
            <cpt:tree key="recommended_org" cacheable="false" className="hn_iuput_kuang " readonly="true"
                      value="${recomend_org}" label="归口管理单位"
                      id="recomend_org" showPattern="all" shieldPattern="0" topCheckbox="false"
                      onClick="initTreeValueExt"/>
            <input type="hidden" id="recomend_org_value" name="proposal/recomend_org_value" class="required"
                   value="<x:out select="$xmlData/data/proposal/recomend_org_value" />" label="归口管理单位">
            <input type="hidden" name="proposal/recomend_org_name"
                   value="<x:out select="$xmlData/data/proposal/recomend_org_name" />">
        </td>
        <td align="right">高企证书号码：</td>
        <td>
            <input type="text" name="proposal/cer_no" class="required" maxlength="50"
                   value="<x:out select="$xmlData/data/proposal/cer_no" />" label="高企证书号码">
		</span>
        </td>
    </tr>
    <tr>
        <td align="right">项目联系人姓名：</td>
        <td>
            <input type="text" name="proposal/contact_psn_cname" class="required" maxlength="50"
                   value="<x:out select="$xmlData/data/proposal/contact_psn_cname" />" label="项目联系人姓名">
        </td>
        <td align="right">联系人手机：</td>
        <td>
            <input type="text" name="proposal/contact_psn_mobile" class="required  mobile  "
                   onfocus="InitInput.setNumber(this,11,0,0);"
                   value="<x:out select="$xmlData/data/proposal/contact_psn_mobile" />" label="联系人手机">
        </td>
    </tr>
    <tr>
        <td align="right">项目负责人：</td>
        <td>
            <span name="proposal/fzr_psnname"><x:out
                    select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/zh_name"/></span>
        </td>
        <td align="right">电子邮箱：</td>
        <td>
            <span name="proposal/fzr_email"><x:out
                    select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/email"/></span>
        </td>
    </tr>
    <tr>
        <td align="right">手机号码：</td>
        <td>
            <span name="proposal/fzr_mobile"><x:out
                    select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/mobile"/></span>
        </td>
        <td align="right">联系电话：</td>
        <td>
            <span name="proposal/fzr_tel"><x:out
                    select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/tel_work"/></span>
        </td>
    </tr>
    <tr>
        <td align="right">项目申请金额（万元）：</td>
        <td>
            <input type='text' name='proposal/request_money' class="required" id='request_money'
                   onfocus="InitInput.setNumber(this,9,2,2)" style="text-align: right;"
                   value='<x:out select="$xmlData/data/proposal/request_money"/>' label="项目申请金额">
        </td>
        <c:choose>
        <c:when test="${fn:substring(nature_value,0,1) eq 'A'}">
        <td align="right">上年销售收入：（万元）</td>
        <td align="center">
                    <span name="finances/income">
                        <x:out select="$xmlData/data/finances/finance[@sequence_no=5]/income"/>
                    </span>
        </td>
    </tr>
    <tr>
        <td align="right">上年研发投入（万元）：</td>
        <td align="center">
	    		    <span name="finances/yanfa_income">
				        <x:out select="$xmlData/data/finances/finance[@sequence_no=5]/yanfa_income"/>
		            </span>
        </td>
        <td align="right">上年度高新技术产品（服务）收入<br/>（万元）：</td>
        <td align="center">
                    <span name="finances/income_hightech">
                        <x:out select="$xmlData/data/organization/finances/finance[@sequence_no=5]/income_hightech"/>
                    </span>
        </td>
    </tr>
    <tr>
        <td align="right">上年净资产（万元）：</td>
        <td >
                        <input type='text' name='finances/assets_fixed' class="required"
                               onfocus="InitInput.setNumber(this,7,2,2)" style="text-align: right;"
                               value='<x:out select="$xmlData/data/finances/assets_fixed"/>' label="上年净资产">
        </td>
        <td align="right">上年利润总额（万元）：</td>
        <td align="center">
	    		    <span name="finances/proft_total">
				        <x:out select="$xmlData/data/organization/finances/finance[@sequence_no='5']/proft_total"/>
		            </span>
        </td>
    </tr>
    </c:when>
    <c:otherwise>
        <td align="right">上年销售收入：（万元）</td>
        <td align="left">
            <input type='text' name='finances/income' class="required" id='income'
                   onfocus="InitInput.setNumber(this,7,2,2)" style="text-align: right;"
                   value='<x:out select="$xmlData/data/finances/income"/>' label="上年销售收入">
        </td>
        </tr>
        <tr>
            <td align="right">上年研发投入（万元）：</td>
            <td align="left">
                <input type='text' name='finances/yanfa_income' class="required" id='yanfa_income'
                       onfocus="InitInput.setNumber(this,7,2,2)" style="text-align: right;"
                       value='<x:out select="$xmlData/data/finances/yanfa_income"/>' label="上年研发投入">
            </td>
            <td align="right">上年度高新技术产品（服务）收入<br/>（万元）：</td>
            <td align="left">
                <input type='text' name='finances/income_hightech' class="required" id='income_hightech'
                       onfocus="InitInput.setNumber(this,7,2,2)" style="text-align: right;"
                       value='<x:out select="$xmlData/data/finances/income_hightech"/>' label="上年度高新技术产品（服务）收入">
            </td>

        </tr>
        <tr>
            <td align="right">上年净资产（万元）：</td>
            <td align="left">
                <input type='text' name='finances/assets_fixed' class="required" id='assets_fixed'
                       onfocus="InitInput.setNumber(this,7,2,2)" style="text-align: right;"
                       value='<x:out select="$xmlData/data/finances/assets_fixed"/>' label="上年净资产">
            </td>
            <td align="right">上年利润总额（万元）：</td>
            <td align="left">
                <input type='text' name='finances/proft_total' class="required" id='proft_total'
                       onfocus="InitInput.setNumber(this,7,2,2)" style="text-align: right;"
                       value='<x:out select="$xmlData/data/finances/proft_total"/>' label="上年利润总额">
            </td>
        </tr>
    </c:otherwise>
    </c:choose>
    <tr>
        <td align="right" rowspan="2">获得知识产权数量（件）：</td>
        <td align="center">I类</td>
        <td colspan="2">
            <input type='text' onfocus="InitInput.setNumber(this,9,0,0)" style="text-align: right;"
                   name="proposal/sub_type_i" id='zh_i' style="width: 80%"
                   class="input_css required maxlength:50"
                   value="<x:out select="$xmlData/data/proposal/sub_type_i" />" label="获得知识产权数量-->I类">
        </td>
    </tr>
    <tr>
        <td align="center">II类</td>
        <td colspan="2">
            <input type='text' onfocus="InitInput.setNumber(this,9,0,0)" style="text-align: right;"
                   name="proposal/sub_type_ii" id='zh_ii' style="width: 80%"
                   class="input_css required maxlength:50"
                   value="<x:out select="$xmlData/data/proposal/sub_type_ii" />"
                   label="获得知识产权数量-->II类"></td>
    </tr>
    <tr>
        <td align="right" rowspan="2">人力资源情况（人）：</td>
        <td align="center">职工总数</td>
        <td colspan="2" align="center">
            <span name="organization_persons/people_count_total">
				<x:out select="$xmlData/data/organization_persons/people_count_total"/>
		    </span>
        </td>
    </tr>
    <tr>
        <td align="center">科技人员数</td>
        <td colspan="2" align="center">
            <span name="organization_persons/job_yanfa">
				<x:out select="$xmlData/data/organization_persons/job_yanfa"/>
		    </span>
        </td>
    </tr>
    <tr>
        <td align="right">上年认定后截止目前是否发生过重大安全、重大质量事故或严重环境违法行为：</td>
        <td colspan="3">
            <cpt:checkbox key="is_or_no" name="proposal/is_no" repeatColumn="3" tagType="radio"></cpt:checkbox>
            <input type="hidden" id="is_no_value" name="proposal/is_no_value" class="required"
                   label="上年认定后截止目前是否发生过重大安全、重大质量事故或严重环境违法行为"
                   value="<x:out select="$xmlData/data/proposal/is_no_value" />">
            <input type="hidden" name="proposal/is_no_name"
                   value="<x:out select="$xmlData/data/proposal/is_no_name" />">
        </td>
    </tr>
    <tr style="display: none"></tr>
    <tr>
        <td align="right">省奖励经费拟使用方式（限280字）：</td>
        <td colspan="3">
            <textarea name="proposal/tech_assign" style="width:98%" class="input_textarea required maxlength:280"
                      label="省奖励经费拟使用方式" rows=10 cols=60><x:out
                    select="$xmlData/data/proposal//tech_assign"/></textarea>
            <input type="hidden" name="proposal/tech_assign_hidden" id="project/tech_assign_hidden"
                   value="<x:out select="$xmlData/data/proposal/tech_assign_hidden" />"/>
        </td>

    </tr>


</table>
<script type="text/javascript">
    function initTreeValueExt(treeId, treeNode) {
        if ((treeNode && treeNode.isParent)) {
            scmWarn("请选择具体的" + $("#" + treeId).attr("label"));
            $("#" + treeId).val("");
            $("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId + "_code']").val("");
            $("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId + "_value']").val("");
            $("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId + "_name']").val("");
            return false;
        }
        var str = treeNode.name;
        var obj = treeNode.parentNode;
        while (obj != null) {
            str = obj.name + "-" + str;
            obj = obj.parentNode;
        }

        $("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId + "_code']").val(treeNode.id);
        $("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId + "_value']").val(treeNode.id);
        $("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId + "_name']").val(str);
    }
</script>	